<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Init extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('user_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('username')->nullable();
            $table->string('password');

        });
        Schema::create('now_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');//姓名
            $table->string('time');//进入时间
        });
        Schema::create('access_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');//姓名
            $table->string('in_time');//进入时间
            $table->string('out_time');//离开时间
            $table->string('count');//学习时间
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('user_info');
        Schema::dropIfExists('now_info');
        Schema::dropIfExists('access_info');

    }
}
